.TH "Timer" 3 "25 May 2010" "Colision" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Timer \- 
.PP
Módulo dos Timers.  

.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBTICKS_PER_STEP\fP   20"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "void \fBtimer_init\fP (int timer, int mode)"
.br
.ti -1c
.RI "void \fBtimer_load\fP (int timer, int value)"
.br
.ti -1c
.RI "void \fBmili_sleep\fP (int mili)"
.br
.ti -1c
.RI "void \fBsec_sleep\fP (int secs)"
.br
.ti -1c
.RI "void \fBsetTimer\fP (int *timer, int mili)"
.br
.ti -1c
.RI "\fBBool\fP \fBgetTimerReached\fP (int *timer)"
.br
.ti -1c
.RI "void \fBinitTimer0\fP (void(*t0_handler)(void))"
.br
.ti -1c
.RI "void \fBendTimer0\fP ()"
.br
.in -1c
.SS "Endereços de Timer."
 
.in +1c
.ti -1c
.RI "#define \fBTIMER_0\fP   0x40"
.br
.ti -1c
.RI "#define \fBTIMER_1\fP   0x41"
.br
.ti -1c
.RI "#define \fBTIMER_2\fP   0x42"
.br
.ti -1c
.RI "#define \fBTIMER_CTRL\fP   0x43"
.br
.in -1c
.SS "Controlo do Altifalante e Timer2."
 
.in +1c
.ti -1c
.RI "#define \fBSPEAKER_CTRL\fP   0x61"
.br
.ti -1c
.RI "#define \fBTIMER2_ENABLE\fP   (1 << 0)"
.br
.ti -1c
.RI "#define \fBSPEAKER_ENABLE\fP   (1 << 1)"
.br
.ti -1c
.RI "#define \fBSPEAKER_DISABLE\fP   (0 << 0)"
.br
.in -1c
.SS "Algumas definições sobre Timers util."
 
.in +1c
.ti -1c
.RI "#define \fBTIMER_CLK\fP   1193181"
.br
.ti -1c
.RI "#define \fBLCOM_MODE\fP   0x36"
.br
.ti -1c
.RI "#define \fBLSB\fP(i)   ((i) & 0xFF)"
.br
.ti -1c
.RI "#define \fBMSB\fP(i)   ((i) >> 8)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Módulo dos Timers. 
.SH "Define Documentation"
.PP 
.SS "#define LCOM_MODE   0x36"
.SS "#define LSB(i)   ((i) & 0xFF)"
.SS "#define MSB(i)   ((i) >> 8)"
.SS "#define SPEAKER_CTRL   0x61"
.SS "#define SPEAKER_DISABLE   (0 << 0)"
.SS "#define SPEAKER_ENABLE   (1 << 1)"
.SS "#define TICKS_PER_STEP   20"
.SS "#define TIMER2_ENABLE   (1 << 0)"
.SS "#define TIMER_0   0x40"
.SS "#define TIMER_1   0x41"
.SS "#define TIMER_2   0x42"
.SS "#define TIMER_CLK   1193181"
.SS "#define TIMER_CTRL   0x43"
.SH "Function Documentation"
.PP 
.SS "void endTimer0 ()"Termina o Timer0. Desinstala rotina de interrupção. 
.SS "\fBBool\fP getTimerReached (int * timer)"Verifica (e devolve) se o timer foi alcançado, colocando o timer a 0 se afirmativo. 
.SS "void initTimer0 (void(*)(void) t0_handler)"Inicializa o Timer0. Instala rotina de interrupção. 
.SS "void mili_sleep (int mili)"Aguarda x milisegundos, usando o Timer0 como relógio.
.PP
Wait mili miliseconds, indirectly counting T0 interrupts 
.SS "void sec_sleep (int secs)"Aguarda x segundos, usando o Timer0 como relógio.
.PP
wait secs seconds, indirectly counting T0 interrupts 
.SS "void setTimer (int * timer, int mili)"Inicia um timer. 
.SS "void timer_init (int timer, int mode)"Programa o timer (0,1,2) com um modo.
.PP
Program timer (0,1,2) with mode 
.SS "void timer_load (int timer, int value)"Carrega o timer (0,1,2) com um valor.
.PP
Load timer (0,1,2) with value 
.SH "Author"
.PP 
Generated automatically by Doxygen for Colision from the source code.
